package May._06.test32;

import java.io.*;
import java.util.Properties;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String name = scanner.nextLine();
        String password = scanner.nextLine();
        //从配置文件中读取用户名和密码
        Properties properties = new Properties();
        try {
            properties.load(new InputStreamReader(new FileInputStream("fileTest/config.properties")));
            String realName = properties.getProperty("name");
            String realPassword = properties.getProperty("password");
            if(realName.equals(name)&&realPassword.equals(password)){
                System.out.println("输入正确");
            }else {
                System.out.println("输入错误");
            }
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
